<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        li {
            list-style: none;
        }
        
        .xinlan {
            width: 320px;
        }
        
        .xinlan li {
            float: left;
            width: 80px;
        }
        
        .xinlan li a {
            display: block;
            width: 80px;
            height: 40px;
        }
        
        .xinlan li ul {
            display: none;
        }
        
        .xinlan li ul li {
            border: 1px solid red;
        }
    </style>
</head>

<body>
    <ul class="xinlan">
        <li>
            <a href="https://www.sina.com.cn/">微博</a>
            <ul>
                <li>私信</li>
                <li>评论</li>
                <li>艾特我</li>
            </ul>
        </li>
        <li>
            <a href="https://www.sina.com.cn/">微博</a>
            <ul>
                <li>私信</li>
                <li>评论</li>
                <li>艾特我</li>
            </ul>
        </li>
        <li>
            <a href="https://www.sina.com.cn/">微博</a>
            <ul>
                <li>私信</li>
                <li>评论</li>
                <li>艾特我</li>
            </ul>
        </li>
        <li>
            <a href="https://www.sina.com.cn/">微博</a>
            <ul>
                <li>私信</li>
                <li>评论</li>
                <li>艾特我</li>
            </ul>
        </li>
    </ul>
    <script>
        var lis = document.querySelector('.xinlan').querySelectorAll('li');
        for (var i = 0; i < lis.length; i++) {
            lis[i].onmousemove = function() {
                this.children[1].style.display = 'block';
            }
            lis[i].onmouseout = function() {
                this.children[1].style.display = 'none';

            }
        }
    </script>
</body>

</html>